#ifndef _SYSTEM_INFO_H_
#define _SYSTEM_INFO_H_
#include "types.h"
#include <string>

class SystemInfo {
public:
    SystemInfo() : _smbiosVersion(0), _length(0), _wakeupType(0) {}
    SystemInfo(UINT16 ver, UINT8 len, const std::string &manufacturer, const std::string &productName,
               const std::string &version, const std::string &serialNumber) : 
               _smbiosVersion(ver), _length(len), _manufacturer(manufacturer), 
               _productName(productName), _version(version), _serialNumber(serialNumber), _wakeupType(0) {}
    
    void        setGeneral(UINT8 len, const std::string &manufacturer, const std::string &productName,
                           const std::string &version, const std::string &serialNumber);
    void        setUUID(const UINT8 *uuid);

    void        setWakeupType(UINT8 wt) { _wakeupType = wt; }

    void        setSkuNumber(const std::string &skuNumber) { _skuNumber = skuNumber; }

    void        setFamily(const std::string &family) { _family = family; }

    void        setSmbiosVersion(UINT16 ver) { _smbiosVersion = ver; }

    void        print();

private:
    void        printSystemUUID();

    const char* printSystemWakeUpType();

private:
    // 2.0+
    UINT16      _smbiosVersion;
    UINT8       _length;
    std::string _manufacturer;
    std::string _productName;
    std::string _version;
    std::string _serialNumber;
    // 2.1+
    UINT8       _UUID[16];
    UINT8       _wakeupType;
    // 2.4+
    std::string _skuNumber;
    std::string _family;
};

#endif